package samsung.sds.survey.surveyList.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import samsung.sds.survey.surveyList.dao.SurveyListMapper;
import samsung.sds.survey.surveyList.service.SurveyListService;
import samsung.sds.survey.surveyManagement.model.SurveyEntity;

import samsung.sds.system.common.baseQuery.AbstractBaseService;
import samsung.sds.system.common.baseQuery.BaseMapper;

/**
 * @author tingcai.liu
 * @createDate 2016-01-12
 * 
 * 投票信息Service的接口的实现类
 */
@Service
public class SurveyListServiceImpl extends AbstractBaseService<SurveyEntity> implements SurveyListService{
	@Autowired
	private SurveyListMapper surveyListMapper; 
	
	/**
	 * 重写父类的方法
	 */
	@Override
	protected BaseMapper<SurveyEntity> getMapper() {
		return surveyListMapper;
	}
	
	/**
	 * 获取待投票的总数
	 * @param username
	 * @return
	 */
	public int selectTF_F_SURVEY_USER01(String username){
		return surveyListMapper.selectTF_F_SURVEY_USER01(username);
	}
	
	/**
	 * 获取进行中的总数
	 * @param username
	 * @return
	 */
	public int selectTF_F_SURVEY_USER02(String username){
		return surveyListMapper.selectTF_F_SURVEY_USER02(username);
	}
	
	/**
	 * 获取已结束的总数
	 * @param username
	 * @return
	 */
	public int selectTF_F_SURVEY_USER03(String username){
		return surveyListMapper.selectTF_F_SURVEY_USER03(username);
	}
	
	/**
	 * 获取已参与的总数
	 * @param username
	 * @return
	 */
	public int selectTF_F_SURVEY_USER04(String username){
		return surveyListMapper.selectTF_F_SURVEY_USER04(username);
	}

}
